// ml:run = $bin < input
#include <iostream>
#include <string>

int const maxn = 5007;
std::string s;
bool ok[maxn][maxn];
int pat[maxn][maxn];
int ans[30];
int len;

int main()
{
    std::ios::sync_with_stdio(false);
    std::cin >> s;
    len = s.size();

    for (int l = 1; l <= len; l++)
        for (int i = 0; i + l - 1 < len; i++) {
            auto j = i + l - 1;
            if (s[i] != s[j]) continue;
            if (i == j || i + 1 == j || ok[i + 1][j - 1]) ok[i][j] = true;
        }

    for (int l = 1; l <= len; l++)
        for (int i = 0; i + l - 1 < len; i++) {
            auto j = i + l - 1;
            auto tl = j - i + 1;
            auto p1 = pat[i][i + tl/2 - 1];
            auto p2 = pat[j - tl/2 + 1][j];
            if (ok[i][j]) pat[i][j] = 1;
            if (s[i] != s[j]) continue;
            if (i + 1 != j && !ok[i + 1][j - 1]) continue;
            if (p1 == p2) pat[i][j] = p1 + 1;
        }
    for (int i = 0; i < len; i++) {
        for (int j = i; j < len; j++) {
            ans[pat[i][j]]++;
        }
    }

    for (int i = 27; i >= 0; i--) ans[i] += ans[i + 1];
    for (int i = 1; i <= len; i++) {
        if (i > 1) std::cout << " ";
        if (i >= 30) std::cout << "0";
        else std::cout << ans[i] ;
    }
    std::cout << "\n";
 }

